//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension SFN {
    // MARK: Enums

    public enum ExecutionStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case aborted = "ABORTED"
        case failed = "FAILED"
        case running = "RUNNING"
        case succeeded = "SUCCEEDED"
        case timedOut = "TIMED_OUT"
        public var description: String { return self.rawValue }
    }

    public enum HistoryEventType: String, CustomStringConvertible, Codable, _SotoSendable {
        case activityFailed = "ActivityFailed"
        case activityScheduleFailed = "ActivityScheduleFailed"
        case activityScheduled = "ActivityScheduled"
        case activityStarted = "ActivityStarted"
        case activitySucceeded = "ActivitySucceeded"
        case activityTimedOut = "ActivityTimedOut"
        case choiceStateEntered = "ChoiceStateEntered"
        case choiceStateExited = "ChoiceStateExited"
        case executionAborted = "ExecutionAborted"
        case executionFailed = "ExecutionFailed"
        case executionStarted = "ExecutionStarted"
        case executionSucceeded = "ExecutionSucceeded"
        case executionTimedOut = "ExecutionTimedOut"
        case failStateEntered = "FailStateEntered"
        case lambdaFunctionFailed = "LambdaFunctionFailed"
        case lambdaFunctionScheduleFailed = "LambdaFunctionScheduleFailed"
        case lambdaFunctionScheduled = "LambdaFunctionScheduled"
        case lambdaFunctionStartFailed = "LambdaFunctionStartFailed"
        case lambdaFunctionStarted = "LambdaFunctionStarted"
        case lambdaFunctionSucceeded = "LambdaFunctionSucceeded"
        case lambdaFunctionTimedOut = "LambdaFunctionTimedOut"
        case mapIterationAborted = "MapIterationAborted"
        case mapIterationFailed = "MapIterationFailed"
        case mapIterationStarted = "MapIterationStarted"
        case mapIterationSucceeded = "MapIterationSucceeded"
        case mapRunAborted = "MapRunAborted"
        case mapRunFailed = "MapRunFailed"
        case mapRunStarted = "MapRunStarted"
        case mapRunSucceeded = "MapRunSucceeded"
        case mapStateAborted = "MapStateAborted"
        case mapStateEntered = "MapStateEntered"
        case mapStateExited = "MapStateExited"
        case mapStateFailed = "MapStateFailed"
        case mapStateStarted = "MapStateStarted"
        case mapStateSucceeded = "MapStateSucceeded"
        case parallelStateAborted = "ParallelStateAborted"
        case parallelStateEntered = "ParallelStateEntered"
        case parallelStateExited = "ParallelStateExited"
        case parallelStateFailed = "ParallelStateFailed"
        case parallelStateStarted = "ParallelStateStarted"
        case parallelStateSucceeded = "ParallelStateSucceeded"
        case passStateEntered = "PassStateEntered"
        case passStateExited = "PassStateExited"
        case succeedStateEntered = "SucceedStateEntered"
        case succeedStateExited = "SucceedStateExited"
        case taskFailed = "TaskFailed"
        case taskScheduled = "TaskScheduled"
        case taskStartFailed = "TaskStartFailed"
        case taskStarted = "TaskStarted"
        case taskStateAborted = "TaskStateAborted"
        case taskStateEntered = "TaskStateEntered"
        case taskStateExited = "TaskStateExited"
        case taskSubmitFailed = "TaskSubmitFailed"
        case taskSubmitted = "TaskSubmitted"
        case taskSucceeded = "TaskSucceeded"
        case taskTimedOut = "TaskTimedOut"
        case waitStateAborted = "WaitStateAborted"
        case waitStateEntered = "WaitStateEntered"
        case waitStateExited = "WaitStateExited"
        public var description: String { return self.rawValue }
    }

    public enum LogLevel: String, CustomStringConvertible, Codable, _SotoSendable {
        case all = "ALL"
        case error = "ERROR"
        case fatal = "FATAL"
        case off = "OFF"
        public var description: String { return self.rawValue }
    }

    public enum MapRunStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case aborted = "ABORTED"
        case failed = "FAILED"
        case running = "RUNNING"
        case succeeded = "SUCCEEDED"
        public var description: String { return self.rawValue }
    }

    public enum StateMachineStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case active = "ACTIVE"
        case deleting = "DELETING"
        public var description: String { return self.rawValue }
    }

    public enum StateMachineType: String, CustomStringConvertible, Codable, _SotoSendable {
        case express = "EXPRESS"
        case standard = "STANDARD"
        public var description: String { return self.rawValue }
    }

    public enum SyncExecutionStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case failed = "FAILED"
        case succeeded = "SUCCEEDED"
        case timedOut = "TIMED_OUT"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct ActivityFailedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct ActivityListItem: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that identifies the activity.
        public let activityArn: String
        /// The date the activity is created.
        public let creationDate: Date
        /// The name of the activity.  A name must not contain:   white space   brackets  { } [ ]    wildcard characters ? *    special characters " # % \ ^ | ~ ` $ & , ; : /    control characters (U+0000-001F, U+007F-009F)   To enable logging with CloudWatch Logs, the name should only contain  0-9, A-Z, a-z, - and _.
        public let name: String

        public init(activityArn: String, creationDate: Date, name: String) {
            self.activityArn = activityArn
            self.creationDate = creationDate
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case activityArn
            case creationDate
            case name
        }
    }

    public struct ActivityScheduleFailedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct ActivityScheduledEventDetails: AWSDecodableShape {
        /// The maximum allowed duration between two heartbeats for the activity task.
        public let heartbeatInSeconds: Int64?
        /// The JSON data input to the activity task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let input: String?
        /// Contains details about the input for an execution history event.
        public let inputDetails: HistoryEventExecutionDataDetails?
        /// The Amazon Resource Name (ARN) of the scheduled activity.
        public let resource: String
        /// The maximum allowed duration of the activity task.
        public let timeoutInSeconds: Int64?

        public init(heartbeatInSeconds: Int64? = nil, input: String? = nil, inputDetails: HistoryEventExecutionDataDetails? = nil, resource: String, timeoutInSeconds: Int64? = nil) {
            self.heartbeatInSeconds = heartbeatInSeconds
            self.input = input
            self.inputDetails = inputDetails
            self.resource = resource
            self.timeoutInSeconds = timeoutInSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case heartbeatInSeconds
            case input
            case inputDetails
            case resource
            case timeoutInSeconds
        }
    }

    public struct ActivityStartedEventDetails: AWSDecodableShape {
        /// The name of the worker that the task is assigned to. These names are provided by the workers when calling GetActivityTask.
        public let workerName: String?

        public init(workerName: String? = nil) {
            self.workerName = workerName
        }

        private enum CodingKeys: String, CodingKey {
            case workerName
        }
    }

    public struct ActivitySucceededEventDetails: AWSDecodableShape {
        /// The JSON data output by the activity task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let output: String?
        /// Contains details about the output of an execution history event.
        public let outputDetails: HistoryEventExecutionDataDetails?

        public init(output: String? = nil, outputDetails: HistoryEventExecutionDataDetails? = nil) {
            self.output = output
            self.outputDetails = outputDetails
        }

        private enum CodingKeys: String, CodingKey {
            case output
            case outputDetails
        }
    }

    public struct ActivityTimedOutEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the timeout.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct BillingDetails: AWSDecodableShape {
        /// Billed duration of your workflow, in milliseconds.
        public let billedDurationInMilliseconds: Int64?
        /// Billed memory consumption of your workflow, in MB.
        public let billedMemoryUsedInMB: Int64?

        public init(billedDurationInMilliseconds: Int64? = nil, billedMemoryUsedInMB: Int64? = nil) {
            self.billedDurationInMilliseconds = billedDurationInMilliseconds
            self.billedMemoryUsedInMB = billedMemoryUsedInMB
        }

        private enum CodingKeys: String, CodingKey {
            case billedDurationInMilliseconds
            case billedMemoryUsedInMB
        }
    }

    public struct CloudWatchEventsExecutionDataDetails: AWSDecodableShape {
        /// Indicates whether input or output was included in the response. Always true for API calls.
        public let included: Bool?

        public init(included: Bool? = nil) {
            self.included = included
        }

        private enum CodingKeys: String, CodingKey {
            case included
        }
    }

    public struct CloudWatchLogsLogGroup: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the the CloudWatch log group to which you want your logs emitted to. The ARN must end with :*
        public let logGroupArn: String?

        public init(logGroupArn: String? = nil) {
            self.logGroupArn = logGroupArn
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupArn, name: "logGroupArn", parent: name, max: 256)
            try self.validate(self.logGroupArn, name: "logGroupArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupArn
        }
    }

    public struct CreateActivityInput: AWSEncodableShape {
        /// The name of the activity to create. This name must be unique for your Amazon Web Services account and region for 90 days. For more information, see  Limits Related to State Machine Executions in the Step Functions Developer Guide.  A name must not contain:   white space   brackets  { } [ ]    wildcard characters ? *    special characters " # % \ ^ | ~ ` $ & , ; : /    control characters (U+0000-001F, U+007F-009F)   To enable logging with CloudWatch Logs, the name should only contain  0-9, A-Z, a-z, - and _.
        public let name: String
        /// The list of tags to add to a resource.  An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide, and Controlling Access Using IAM Tags.  Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @.
        public let tags: [Tag]?

        public init(name: String, tags: [Tag]? = nil) {
            self.name = name
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case tags
        }
    }

    public struct CreateActivityOutput: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that identifies the created activity.
        public let activityArn: String
        /// The date the activity is created.
        public let creationDate: Date

        public init(activityArn: String, creationDate: Date) {
            self.activityArn = activityArn
            self.creationDate = creationDate
        }

        private enum CodingKeys: String, CodingKey {
            case activityArn
            case creationDate
        }
    }

    public struct CreateStateMachineInput: AWSEncodableShape {
        /// The Amazon States Language definition of the state machine. See Amazon States Language.
        public let definition: String
        /// Defines what execution history events are logged and where they are logged.  By default, the level is set to OFF. For more information see Log Levels in the Step Functions User Guide.
        public let loggingConfiguration: LoggingConfiguration?
        /// The name of the state machine.   A name must not contain:   white space   brackets  { } [ ]    wildcard characters ? *    special characters " # % \ ^ | ~ ` $ & , ; : /    control characters (U+0000-001F, U+007F-009F)   To enable logging with CloudWatch Logs, the name should only contain  0-9, A-Z, a-z, - and _.
        public let name: String
        /// The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
        public let roleArn: String
        /// Tags to be added when creating a state machine.  An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide, and Controlling Access Using IAM Tags.  Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @.
        public let tags: [Tag]?
        /// Selects whether X-Ray tracing is enabled.
        public let tracingConfiguration: TracingConfiguration?
        /// Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created.
        public let type: StateMachineType?

        public init(definition: String, loggingConfiguration: LoggingConfiguration? = nil, name: String, roleArn: String, tags: [Tag]? = nil, tracingConfiguration: TracingConfiguration? = nil, type: StateMachineType? = nil) {
            self.definition = definition
            self.loggingConfiguration = loggingConfiguration
            self.name = name
            self.roleArn = roleArn
            self.tags = tags
            self.tracingConfiguration = tracingConfiguration
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.definition, name: "definition", parent: name, max: 1_048_576)
            try self.validate(self.definition, name: "definition", parent: name, min: 1)
            try self.loggingConfiguration?.validate(name: "\(name).loggingConfiguration")
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 256)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case definition
            case loggingConfiguration
            case name
            case roleArn
            case tags
            case tracingConfiguration
            case type
        }
    }

    public struct CreateStateMachineOutput: AWSDecodableShape {
        /// The date the state machine is created.
        public let creationDate: Date
        /// The Amazon Resource Name (ARN) that identifies the created state machine.
        public let stateMachineArn: String

        public init(creationDate: Date, stateMachineArn: String) {
            self.creationDate = creationDate
            self.stateMachineArn = stateMachineArn
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case stateMachineArn
        }
    }

    public struct DeleteActivityInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the activity to delete.
        public let activityArn: String

        public init(activityArn: String) {
            self.activityArn = activityArn
        }

        public func validate(name: String) throws {
            try self.validate(self.activityArn, name: "activityArn", parent: name, max: 256)
            try self.validate(self.activityArn, name: "activityArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case activityArn
        }
    }

    public struct DeleteActivityOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteStateMachineInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the state machine to delete.
        public let stateMachineArn: String

        public init(stateMachineArn: String) {
            self.stateMachineArn = stateMachineArn
        }

        public func validate(name: String) throws {
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, max: 256)
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case stateMachineArn
        }
    }

    public struct DeleteStateMachineOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeActivityInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the activity to describe.
        public let activityArn: String

        public init(activityArn: String) {
            self.activityArn = activityArn
        }

        public func validate(name: String) throws {
            try self.validate(self.activityArn, name: "activityArn", parent: name, max: 256)
            try self.validate(self.activityArn, name: "activityArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case activityArn
        }
    }

    public struct DescribeActivityOutput: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that identifies the activity.
        public let activityArn: String
        /// The date the activity is created.
        public let creationDate: Date
        /// The name of the activity.  A name must not contain:   white space   brackets  { } [ ]    wildcard characters ? *    special characters " # % \ ^ | ~ ` $ & , ; : /    control characters (U+0000-001F, U+007F-009F)   To enable logging with CloudWatch Logs, the name should only contain  0-9, A-Z, a-z, - and _.
        public let name: String

        public init(activityArn: String, creationDate: Date, name: String) {
            self.activityArn = activityArn
            self.creationDate = creationDate
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case activityArn
            case creationDate
            case name
        }
    }

    public struct DescribeExecutionInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the execution to describe.
        public let executionArn: String

        public init(executionArn: String) {
            self.executionArn = executionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.executionArn, name: "executionArn", parent: name, max: 256)
            try self.validate(self.executionArn, name: "executionArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case executionArn
        }
    }

    public struct DescribeExecutionOutput: AWSDecodableShape {
        /// The cause string if the state machine execution failed.
        public let cause: String?
        /// The error string if the state machine execution failed.
        public let error: String?
        /// The Amazon Resource Name (ARN) that identifies the execution.
        public let executionArn: String
        /// The string that contains the JSON input data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let input: String?
        public let inputDetails: CloudWatchEventsExecutionDataDetails?
        /// The Amazon Resource Name (ARN) that identifies a Map Run, which dispatched this execution.
        public let mapRunArn: String?
        /// The name of the execution.  A name must not contain:   white space   brackets  { } [ ]    wildcard characters ? *    special characters " # % \ ^ | ~ ` $ & , ; : /    control characters (U+0000-001F, U+007F-009F)   To enable logging with CloudWatch Logs, the name should only contain  0-9, A-Z, a-z, - and _.
        public let name: String?
        /// The JSON output data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.  This field is set only if the execution succeeds. If the execution fails, this field is null.
        public let output: String?
        public let outputDetails: CloudWatchEventsExecutionDataDetails?
        /// The date the execution is started.
        public let startDate: Date
        /// The Amazon Resource Name (ARN) of the executed stated machine.
        public let stateMachineArn: String
        /// The current status of the execution.
        public let status: ExecutionStatus
        /// If the execution has already ended, the date the execution stopped.
        public let stopDate: Date?
        /// The X-Ray trace header that was passed to the execution.
        public let traceHeader: String?

        public init(cause: String? = nil, error: String? = nil, executionArn: String, input: String? = nil, inputDetails: CloudWatchEventsExecutionDataDetails? = nil, mapRunArn: String? = nil, name: String? = nil, output: String? = nil, outputDetails: CloudWatchEventsExecutionDataDetails? = nil, startDate: Date, stateMachineArn: String, status: ExecutionStatus, stopDate: Date? = nil, traceHeader: String? = nil) {
            self.cause = cause
            self.error = error
            self.executionArn = executionArn
            self.input = input
            self.inputDetails = inputDetails
            self.mapRunArn = mapRunArn
            self.name = name
            self.output = output
            self.outputDetails = outputDetails
            self.startDate = startDate
            self.stateMachineArn = stateMachineArn
            self.status = status
            self.stopDate = stopDate
            self.traceHeader = traceHeader
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
            case executionArn
            case input
            case inputDetails
            case mapRunArn
            case name
            case output
            case outputDetails
            case startDate
            case stateMachineArn
            case status
            case stopDate
            case traceHeader
        }
    }

    public struct DescribeMapRunInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies a Map Run.
        public let mapRunArn: String

        public init(mapRunArn: String) {
            self.mapRunArn = mapRunArn
        }

        public func validate(name: String) throws {
            try self.validate(self.mapRunArn, name: "mapRunArn", parent: name, max: 2000)
            try self.validate(self.mapRunArn, name: "mapRunArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case mapRunArn
        }
    }

    public struct DescribeMapRunOutput: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that identifies the execution in which the Map Run was started.
        public let executionArn: String
        /// A JSON object that contains information about the total number of child workflow executions for the Map Run, and the count of child workflow executions for each status, such as failed and succeeded.
        public let executionCounts: MapRunExecutionCounts
        /// A JSON object that contains information about the total number of items, and the item count for each processing status, such as pending and failed.
        public let itemCounts: MapRunItemCounts
        /// The Amazon Resource Name (ARN) that identifies a Map Run.
        public let mapRunArn: String
        /// The maximum number of child workflow executions configured to run in parallel for the Map Run at the same time.
        public let maxConcurrency: Int
        /// The date when the Map Run was started.
        public let startDate: Date
        /// The current status of the Map Run.
        public let status: MapRunStatus
        /// The date when the Map Run was stopped.
        public let stopDate: Date?
        /// The maximum number of failed child workflow executions before the Map Run fails.
        public let toleratedFailureCount: Int64
        /// The maximum percentage of failed child workflow executions before the Map Run fails.
        public let toleratedFailurePercentage: Float

        public init(executionArn: String, executionCounts: MapRunExecutionCounts, itemCounts: MapRunItemCounts, mapRunArn: String, maxConcurrency: Int, startDate: Date, status: MapRunStatus, stopDate: Date? = nil, toleratedFailureCount: Int64, toleratedFailurePercentage: Float) {
            self.executionArn = executionArn
            self.executionCounts = executionCounts
            self.itemCounts = itemCounts
            self.mapRunArn = mapRunArn
            self.maxConcurrency = maxConcurrency
            self.startDate = startDate
            self.status = status
            self.stopDate = stopDate
            self.toleratedFailureCount = toleratedFailureCount
            self.toleratedFailurePercentage = toleratedFailurePercentage
        }

        private enum CodingKeys: String, CodingKey {
            case executionArn
            case executionCounts
            case itemCounts
            case mapRunArn
            case maxConcurrency
            case startDate
            case status
            case stopDate
            case toleratedFailureCount
            case toleratedFailurePercentage
        }
    }

    public struct DescribeStateMachineForExecutionInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the execution you want state machine information for.
        public let executionArn: String

        public init(executionArn: String) {
            self.executionArn = executionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.executionArn, name: "executionArn", parent: name, max: 256)
            try self.validate(self.executionArn, name: "executionArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case executionArn
        }
    }

    public struct DescribeStateMachineForExecutionOutput: AWSDecodableShape {
        /// The Amazon States Language definition of the state machine. See Amazon States Language.
        public let definition: String
        /// A user-defined or an auto-generated string that identifies a Map state. This ﬁeld is returned only if the executionArn is a child workflow execution that was started by a Distributed Map state.
        public let label: String?
        public let loggingConfiguration: LoggingConfiguration?
        /// The Amazon Resource Name (ARN) of the Map Run that started the child workflow execution. This field is returned only if the executionArn is a child workflow execution that was started by a Distributed Map state.
        public let mapRunArn: String?
        /// The name of the state machine associated with the execution.
        public let name: String
        /// The Amazon Resource Name (ARN) of the IAM role of the State Machine for the execution.
        public let roleArn: String
        /// The Amazon Resource Name (ARN) of the state machine associated with the execution.
        public let stateMachineArn: String
        /// Selects whether X-Ray tracing is enabled.
        public let tracingConfiguration: TracingConfiguration?
        /// The date and time the state machine associated with an execution was updated. For a newly created state machine, this is the creation date.
        public let updateDate: Date

        public init(definition: String, label: String? = nil, loggingConfiguration: LoggingConfiguration? = nil, mapRunArn: String? = nil, name: String, roleArn: String, stateMachineArn: String, tracingConfiguration: TracingConfiguration? = nil, updateDate: Date) {
            self.definition = definition
            self.label = label
            self.loggingConfiguration = loggingConfiguration
            self.mapRunArn = mapRunArn
            self.name = name
            self.roleArn = roleArn
            self.stateMachineArn = stateMachineArn
            self.tracingConfiguration = tracingConfiguration
            self.updateDate = updateDate
        }

        private enum CodingKeys: String, CodingKey {
            case definition
            case label
            case loggingConfiguration
            case mapRunArn
            case name
            case roleArn
            case stateMachineArn
            case tracingConfiguration
            case updateDate
        }
    }

    public struct DescribeStateMachineInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the state machine to describe.
        public let stateMachineArn: String

        public init(stateMachineArn: String) {
            self.stateMachineArn = stateMachineArn
        }

        public func validate(name: String) throws {
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, max: 256)
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case stateMachineArn
        }
    }

    public struct DescribeStateMachineOutput: AWSDecodableShape {
        /// The date the state machine is created.
        public let creationDate: Date
        /// The Amazon States Language definition of the state machine. See Amazon States Language.
        public let definition: String
        /// A user-defined or an auto-generated string that identifies a Map state. This parameter is present only if the stateMachineArn specified in input is a qualified state machine ARN.
        public let label: String?
        public let loggingConfiguration: LoggingConfiguration?
        /// The name of the state machine.  A name must not contain:   white space   brackets  { } [ ]    wildcard characters ? *    special characters " # % \ ^ | ~ ` $ & , ; : /    control characters (U+0000-001F, U+007F-009F)   To enable logging with CloudWatch Logs, the name should only contain  0-9, A-Z, a-z, - and _.
        public let name: String
        /// The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role maintains security by granting Step Functions access to Amazon Web Services resources.)
        public let roleArn: String
        /// The Amazon Resource Name (ARN) that identifies the state machine.
        public let stateMachineArn: String
        /// The current status of the state machine.
        public let status: StateMachineStatus?
        /// Selects whether X-Ray tracing is enabled.
        public let tracingConfiguration: TracingConfiguration?
        /// The type of the state machine (STANDARD or EXPRESS).
        public let type: StateMachineType

        public init(creationDate: Date, definition: String, label: String? = nil, loggingConfiguration: LoggingConfiguration? = nil, name: String, roleArn: String, stateMachineArn: String, status: StateMachineStatus? = nil, tracingConfiguration: TracingConfiguration? = nil, type: StateMachineType) {
            self.creationDate = creationDate
            self.definition = definition
            self.label = label
            self.loggingConfiguration = loggingConfiguration
            self.name = name
            self.roleArn = roleArn
            self.stateMachineArn = stateMachineArn
            self.status = status
            self.tracingConfiguration = tracingConfiguration
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case definition
            case label
            case loggingConfiguration
            case name
            case roleArn
            case stateMachineArn
            case status
            case tracingConfiguration
            case type
        }
    }

    public struct ExecutionAbortedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct ExecutionFailedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct ExecutionListItem: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that identifies the execution.
        public let executionArn: String
        /// The total number of items processed in a child workflow execution. This field is returned only if mapRunArn was specified in the ListExecutions API action. If stateMachineArn was specified in ListExecutions, the itemCount field isn't returned.
        public let itemCount: Int?
        /// The Amazon Resource Name (ARN) of a Map Run. This field is returned only if mapRunArn was specified in the ListExecutions API action. If stateMachineArn was specified in ListExecutions, the mapRunArn isn't returned.
        public let mapRunArn: String?
        /// The name of the execution.  A name must not contain:   white space   brackets  { } [ ]    wildcard characters ? *    special characters " # % \ ^ | ~ ` $ & , ; : /    control characters (U+0000-001F, U+007F-009F)   To enable logging with CloudWatch Logs, the name should only contain  0-9, A-Z, a-z, - and _.
        public let name: String
        /// The date the execution started.
        public let startDate: Date
        /// The Amazon Resource Name (ARN) of the executed state machine.
        public let stateMachineArn: String
        /// The current status of the execution.
        public let status: ExecutionStatus
        /// If the execution already ended, the date the execution stopped.
        public let stopDate: Date?

        public init(executionArn: String, itemCount: Int? = nil, mapRunArn: String? = nil, name: String, startDate: Date, stateMachineArn: String, status: ExecutionStatus, stopDate: Date? = nil) {
            self.executionArn = executionArn
            self.itemCount = itemCount
            self.mapRunArn = mapRunArn
            self.name = name
            self.startDate = startDate
            self.stateMachineArn = stateMachineArn
            self.status = status
            self.stopDate = stopDate
        }

        private enum CodingKeys: String, CodingKey {
            case executionArn
            case itemCount
            case mapRunArn
            case name
            case startDate
            case stateMachineArn
            case status
            case stopDate
        }
    }

    public struct ExecutionStartedEventDetails: AWSDecodableShape {
        /// The JSON data input to the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let input: String?
        /// Contains details about the input for an execution history event.
        public let inputDetails: HistoryEventExecutionDataDetails?
        /// The Amazon Resource Name (ARN) of the IAM role used for executing Lambda tasks.
        public let roleArn: String?

        public init(input: String? = nil, inputDetails: HistoryEventExecutionDataDetails? = nil, roleArn: String? = nil) {
            self.input = input
            self.inputDetails = inputDetails
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case input
            case inputDetails
            case roleArn
        }
    }

    public struct ExecutionSucceededEventDetails: AWSDecodableShape {
        /// The JSON data output by the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let output: String?
        /// Contains details about the output of an execution history event.
        public let outputDetails: HistoryEventExecutionDataDetails?

        public init(output: String? = nil, outputDetails: HistoryEventExecutionDataDetails? = nil) {
            self.output = output
            self.outputDetails = outputDetails
        }

        private enum CodingKeys: String, CodingKey {
            case output
            case outputDetails
        }
    }

    public struct ExecutionTimedOutEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the timeout.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct GetActivityTaskInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using CreateActivity.)
        public let activityArn: String
        /// You can provide an arbitrary name in order to identify the worker that the task is assigned to. This name is used when it is logged in the execution history.
        public let workerName: String?

        public init(activityArn: String, workerName: String? = nil) {
            self.activityArn = activityArn
            self.workerName = workerName
        }

        public func validate(name: String) throws {
            try self.validate(self.activityArn, name: "activityArn", parent: name, max: 256)
            try self.validate(self.activityArn, name: "activityArn", parent: name, min: 1)
            try self.validate(self.workerName, name: "workerName", parent: name, max: 80)
            try self.validate(self.workerName, name: "workerName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case activityArn
            case workerName
        }
    }

    public struct GetActivityTaskOutput: AWSDecodableShape {
        /// The string that contains the JSON input data for the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let input: String?
        /// A token that identifies the scheduled task. This token must be copied and included in subsequent calls to SendTaskHeartbeat, SendTaskSuccess or SendTaskFailure in order to report the progress or completion of the task.
        public let taskToken: String?

        public init(input: String? = nil, taskToken: String? = nil) {
            self.input = input
            self.taskToken = taskToken
        }

        private enum CodingKeys: String, CodingKey {
            case input
            case taskToken
        }
    }

    public struct GetExecutionHistoryInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the execution.
        public let executionArn: String
        /// You can select whether execution data (input or output of a history event) is returned. The default is true.
        public let includeExecutionData: Bool?
        /// The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.  This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.
        public let maxResults: Int?
        /// If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// Lists events in descending order of their timeStamp.
        public let reverseOrder: Bool?

        public init(executionArn: String, includeExecutionData: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, reverseOrder: Bool? = nil) {
            self.executionArn = executionArn
            self.includeExecutionData = includeExecutionData
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.reverseOrder = reverseOrder
        }

        public func validate(name: String) throws {
            try self.validate(self.executionArn, name: "executionArn", parent: name, max: 256)
            try self.validate(self.executionArn, name: "executionArn", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case executionArn
            case includeExecutionData
            case maxResults
            case nextToken
            case reverseOrder
        }
    }

    public struct GetExecutionHistoryOutput: AWSDecodableShape {
        /// The list of events that occurred in the execution.
        public let events: [HistoryEvent]
        /// If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
        public let nextToken: String?

        public init(events: [HistoryEvent], nextToken: String? = nil) {
            self.events = events
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case events
            case nextToken
        }
    }

    public struct HistoryEvent: AWSDecodableShape {
        public let activityFailedEventDetails: ActivityFailedEventDetails?
        public let activityScheduledEventDetails: ActivityScheduledEventDetails?
        /// Contains details about an activity schedule event that failed during an execution.
        public let activityScheduleFailedEventDetails: ActivityScheduleFailedEventDetails?
        public let activityStartedEventDetails: ActivityStartedEventDetails?
        public let activitySucceededEventDetails: ActivitySucceededEventDetails?
        public let activityTimedOutEventDetails: ActivityTimedOutEventDetails?
        public let executionAbortedEventDetails: ExecutionAbortedEventDetails?
        public let executionFailedEventDetails: ExecutionFailedEventDetails?
        public let executionStartedEventDetails: ExecutionStartedEventDetails?
        public let executionSucceededEventDetails: ExecutionSucceededEventDetails?
        public let executionTimedOutEventDetails: ExecutionTimedOutEventDetails?
        /// The id of the event. Events are numbered sequentially, starting at one.
        public let id: Int64
        public let lambdaFunctionFailedEventDetails: LambdaFunctionFailedEventDetails?
        public let lambdaFunctionScheduledEventDetails: LambdaFunctionScheduledEventDetails?
        public let lambdaFunctionScheduleFailedEventDetails: LambdaFunctionScheduleFailedEventDetails?
        /// Contains details about a lambda function that failed to start during an execution.
        public let lambdaFunctionStartFailedEventDetails: LambdaFunctionStartFailedEventDetails?
        /// Contains details about a Lambda function that terminated successfully during an execution.
        public let lambdaFunctionSucceededEventDetails: LambdaFunctionSucceededEventDetails?
        public let lambdaFunctionTimedOutEventDetails: LambdaFunctionTimedOutEventDetails?
        /// Contains details about an iteration of a Map state that was aborted.
        public let mapIterationAbortedEventDetails: MapIterationEventDetails?
        /// Contains details about an iteration of a Map state that failed.
        public let mapIterationFailedEventDetails: MapIterationEventDetails?
        /// Contains details about an iteration of a Map state that was started.
        public let mapIterationStartedEventDetails: MapIterationEventDetails?
        /// Contains details about an iteration of a Map state that succeeded.
        public let mapIterationSucceededEventDetails: MapIterationEventDetails?
        /// Contains error and cause details about a Map Run that failed.
        public let mapRunFailedEventDetails: MapRunFailedEventDetails?
        /// Contains details, such as mapRunArn, and the start date and time of a Map Run. mapRunArn is the Amazon Resource Name (ARN) of the Map Run that was started.
        public let mapRunStartedEventDetails: MapRunStartedEventDetails?
        /// Contains details about Map state that was started.
        public let mapStateStartedEventDetails: MapStateStartedEventDetails?
        /// The id of the previous event.
        public let previousEventId: Int64?
        public let stateEnteredEventDetails: StateEnteredEventDetails?
        public let stateExitedEventDetails: StateExitedEventDetails?
        /// Contains details about the failure of a task.
        public let taskFailedEventDetails: TaskFailedEventDetails?
        /// Contains details about a task that was scheduled.
        public let taskScheduledEventDetails: TaskScheduledEventDetails?
        /// Contains details about a task that was started.
        public let taskStartedEventDetails: TaskStartedEventDetails?
        /// Contains details about a task that failed to start.
        public let taskStartFailedEventDetails: TaskStartFailedEventDetails?
        /// Contains details about a task that where the submit failed.
        public let taskSubmitFailedEventDetails: TaskSubmitFailedEventDetails?
        /// Contains details about a submitted task.
        public let taskSubmittedEventDetails: TaskSubmittedEventDetails?
        /// Contains details about a task that succeeded.
        public let taskSucceededEventDetails: TaskSucceededEventDetails?
        /// Contains details about a task that timed out.
        public let taskTimedOutEventDetails: TaskTimedOutEventDetails?
        /// The date and time the event occurred.
        public let timestamp: Date
        /// The type of the event.
        public let type: HistoryEventType

        public init(activityFailedEventDetails: ActivityFailedEventDetails? = nil, activityScheduledEventDetails: ActivityScheduledEventDetails? = nil, activityScheduleFailedEventDetails: ActivityScheduleFailedEventDetails? = nil, activityStartedEventDetails: ActivityStartedEventDetails? = nil, activitySucceededEventDetails: ActivitySucceededEventDetails? = nil, activityTimedOutEventDetails: ActivityTimedOutEventDetails? = nil, executionAbortedEventDetails: ExecutionAbortedEventDetails? = nil, executionFailedEventDetails: ExecutionFailedEventDetails? = nil, executionStartedEventDetails: ExecutionStartedEventDetails? = nil, executionSucceededEventDetails: ExecutionSucceededEventDetails? = nil, executionTimedOutEventDetails: ExecutionTimedOutEventDetails? = nil, id: Int64, lambdaFunctionFailedEventDetails: LambdaFunctionFailedEventDetails? = nil, lambdaFunctionScheduledEventDetails: LambdaFunctionScheduledEventDetails? = nil, lambdaFunctionScheduleFailedEventDetails: LambdaFunctionScheduleFailedEventDetails? = nil, lambdaFunctionStartFailedEventDetails: LambdaFunctionStartFailedEventDetails? = nil, lambdaFunctionSucceededEventDetails: LambdaFunctionSucceededEventDetails? = nil, lambdaFunctionTimedOutEventDetails: LambdaFunctionTimedOutEventDetails? = nil, mapIterationAbortedEventDetails: MapIterationEventDetails? = nil, mapIterationFailedEventDetails: MapIterationEventDetails? = nil, mapIterationStartedEventDetails: MapIterationEventDetails? = nil, mapIterationSucceededEventDetails: MapIterationEventDetails? = nil, mapRunFailedEventDetails: MapRunFailedEventDetails? = nil, mapRunStartedEventDetails: MapRunStartedEventDetails? = nil, mapStateStartedEventDetails: MapStateStartedEventDetails? = nil, previousEventId: Int64? = nil, stateEnteredEventDetails: StateEnteredEventDetails? = nil, stateExitedEventDetails: StateExitedEventDetails? = nil, taskFailedEventDetails: TaskFailedEventDetails? = nil, taskScheduledEventDetails: TaskScheduledEventDetails? = nil, taskStartedEventDetails: TaskStartedEventDetails? = nil, taskStartFailedEventDetails: TaskStartFailedEventDetails? = nil, taskSubmitFailedEventDetails: TaskSubmitFailedEventDetails? = nil, taskSubmittedEventDetails: TaskSubmittedEventDetails? = nil, taskSucceededEventDetails: TaskSucceededEventDetails? = nil, taskTimedOutEventDetails: TaskTimedOutEventDetails? = nil, timestamp: Date, type: HistoryEventType) {
            self.activityFailedEventDetails = activityFailedEventDetails
            self.activityScheduledEventDetails = activityScheduledEventDetails
            self.activityScheduleFailedEventDetails = activityScheduleFailedEventDetails
            self.activityStartedEventDetails = activityStartedEventDetails
            self.activitySucceededEventDetails = activitySucceededEventDetails
            self.activityTimedOutEventDetails = activityTimedOutEventDetails
            self.executionAbortedEventDetails = executionAbortedEventDetails
            self.executionFailedEventDetails = executionFailedEventDetails
            self.executionStartedEventDetails = executionStartedEventDetails
            self.executionSucceededEventDetails = executionSucceededEventDetails
            self.executionTimedOutEventDetails = executionTimedOutEventDetails
            self.id = id
            self.lambdaFunctionFailedEventDetails = lambdaFunctionFailedEventDetails
            self.lambdaFunctionScheduledEventDetails = lambdaFunctionScheduledEventDetails
            self.lambdaFunctionScheduleFailedEventDetails = lambdaFunctionScheduleFailedEventDetails
            self.lambdaFunctionStartFailedEventDetails = lambdaFunctionStartFailedEventDetails
            self.lambdaFunctionSucceededEventDetails = lambdaFunctionSucceededEventDetails
            self.lambdaFunctionTimedOutEventDetails = lambdaFunctionTimedOutEventDetails
            self.mapIterationAbortedEventDetails = mapIterationAbortedEventDetails
            self.mapIterationFailedEventDetails = mapIterationFailedEventDetails
            self.mapIterationStartedEventDetails = mapIterationStartedEventDetails
            self.mapIterationSucceededEventDetails = mapIterationSucceededEventDetails
            self.mapRunFailedEventDetails = mapRunFailedEventDetails
            self.mapRunStartedEventDetails = mapRunStartedEventDetails
            self.mapStateStartedEventDetails = mapStateStartedEventDetails
            self.previousEventId = previousEventId
            self.stateEnteredEventDetails = stateEnteredEventDetails
            self.stateExitedEventDetails = stateExitedEventDetails
            self.taskFailedEventDetails = taskFailedEventDetails
            self.taskScheduledEventDetails = taskScheduledEventDetails
            self.taskStartedEventDetails = taskStartedEventDetails
            self.taskStartFailedEventDetails = taskStartFailedEventDetails
            self.taskSubmitFailedEventDetails = taskSubmitFailedEventDetails
            self.taskSubmittedEventDetails = taskSubmittedEventDetails
            self.taskSucceededEventDetails = taskSucceededEventDetails
            self.taskTimedOutEventDetails = taskTimedOutEventDetails
            self.timestamp = timestamp
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case activityFailedEventDetails
            case activityScheduledEventDetails
            case activityScheduleFailedEventDetails
            case activityStartedEventDetails
            case activitySucceededEventDetails
            case activityTimedOutEventDetails
            case executionAbortedEventDetails
            case executionFailedEventDetails
            case executionStartedEventDetails
            case executionSucceededEventDetails
            case executionTimedOutEventDetails
            case id
            case lambdaFunctionFailedEventDetails
            case lambdaFunctionScheduledEventDetails
            case lambdaFunctionScheduleFailedEventDetails
            case lambdaFunctionStartFailedEventDetails
            case lambdaFunctionSucceededEventDetails
            case lambdaFunctionTimedOutEventDetails
            case mapIterationAbortedEventDetails
            case mapIterationFailedEventDetails
            case mapIterationStartedEventDetails
            case mapIterationSucceededEventDetails
            case mapRunFailedEventDetails
            case mapRunStartedEventDetails
            case mapStateStartedEventDetails
            case previousEventId
            case stateEnteredEventDetails
            case stateExitedEventDetails
            case taskFailedEventDetails
            case taskScheduledEventDetails
            case taskStartedEventDetails
            case taskStartFailedEventDetails
            case taskSubmitFailedEventDetails
            case taskSubmittedEventDetails
            case taskSucceededEventDetails
            case taskTimedOutEventDetails
            case timestamp
            case type
        }
    }

    public struct HistoryEventExecutionDataDetails: AWSDecodableShape {
        /// Indicates whether input or output was truncated in the response. Always false for API calls.
        public let truncated: Bool?

        public init(truncated: Bool? = nil) {
            self.truncated = truncated
        }

        private enum CodingKeys: String, CodingKey {
            case truncated
        }
    }

    public struct LambdaFunctionFailedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct LambdaFunctionScheduleFailedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct LambdaFunctionScheduledEventDetails: AWSDecodableShape {
        /// The JSON data input to the Lambda function. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let input: String?
        /// Contains details about input for an execution history event.
        public let inputDetails: HistoryEventExecutionDataDetails?
        /// The Amazon Resource Name (ARN) of the scheduled Lambda function.
        public let resource: String
        /// The credentials that Step Functions uses for the task.
        public let taskCredentials: TaskCredentials?
        /// The maximum allowed duration of the Lambda function.
        public let timeoutInSeconds: Int64?

        public init(input: String? = nil, inputDetails: HistoryEventExecutionDataDetails? = nil, resource: String, taskCredentials: TaskCredentials? = nil, timeoutInSeconds: Int64? = nil) {
            self.input = input
            self.inputDetails = inputDetails
            self.resource = resource
            self.taskCredentials = taskCredentials
            self.timeoutInSeconds = timeoutInSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case input
            case inputDetails
            case resource
            case taskCredentials
            case timeoutInSeconds
        }
    }

    public struct LambdaFunctionStartFailedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct LambdaFunctionSucceededEventDetails: AWSDecodableShape {
        /// The JSON data output by the Lambda function. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let output: String?
        /// Contains details about the output of an execution history event.
        public let outputDetails: HistoryEventExecutionDataDetails?

        public init(output: String? = nil, outputDetails: HistoryEventExecutionDataDetails? = nil) {
            self.output = output
            self.outputDetails = outputDetails
        }

        private enum CodingKeys: String, CodingKey {
            case output
            case outputDetails
        }
    }

    public struct LambdaFunctionTimedOutEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the timeout.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct ListActivitiesInput: AWSEncodableShape {
        /// The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.  This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.
        public let maxResults: Int?
        /// If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListActivitiesOutput: AWSDecodableShape {
        /// The list of activities.
        public let activities: [ActivityListItem]
        /// If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
        public let nextToken: String?

        public init(activities: [ActivityListItem], nextToken: String? = nil) {
            self.activities = activities
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case activities
            case nextToken
        }
    }

    public struct ListExecutionsInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the Map Run that started the child workflow executions. If the mapRunArn field is specified, a list of all of the child workflow executions started by a Map Run is returned. For more information, see Examining Map Run in the Step Functions Developer Guide. You can specify either a mapRunArn or a stateMachineArn, but not both.
        public let mapRunArn: String?
        /// The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.  This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.
        public let maxResults: Int?
        /// If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the state machine whose executions is listed. You can specify either a mapRunArn or a stateMachineArn, but not both.
        public let stateMachineArn: String?
        /// If specified, only list the executions whose current execution status matches the given filter.
        public let statusFilter: ExecutionStatus?

        public init(mapRunArn: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, stateMachineArn: String? = nil, statusFilter: ExecutionStatus? = nil) {
            self.mapRunArn = mapRunArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.stateMachineArn = stateMachineArn
            self.statusFilter = statusFilter
        }

        public func validate(name: String) throws {
            try self.validate(self.mapRunArn, name: "mapRunArn", parent: name, max: 2000)
            try self.validate(self.mapRunArn, name: "mapRunArn", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 3096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, max: 256)
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case mapRunArn
            case maxResults
            case nextToken
            case stateMachineArn
            case statusFilter
        }
    }

    public struct ListExecutionsOutput: AWSDecodableShape {
        /// The list of matching executions.
        public let executions: [ExecutionListItem]
        /// If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
        public let nextToken: String?

        public init(executions: [ExecutionListItem], nextToken: String? = nil) {
            self.executions = executions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case executions
            case nextToken
        }
    }

    public struct ListMapRunsInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the execution for which the Map Runs must be listed.
        public let executionArn: String
        /// The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.  This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.
        public let maxResults: Int?
        /// If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
        public let nextToken: String?

        public init(executionArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.executionArn = executionArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.executionArn, name: "executionArn", parent: name, max: 256)
            try self.validate(self.executionArn, name: "executionArn", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case executionArn
            case maxResults
            case nextToken
        }
    }

    public struct ListMapRunsOutput: AWSDecodableShape {
        /// An array that lists information related to a Map Run, such as the Amazon Resource Name (ARN) of the Map Run and the ARN of the state machine that started the Map Run.
        public let mapRuns: [MapRunListItem]
        /// If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
        public let nextToken: String?

        public init(mapRuns: [MapRunListItem], nextToken: String? = nil) {
            self.mapRuns = mapRuns
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case mapRuns
            case nextToken
        }
    }

    public struct ListStateMachinesInput: AWSEncodableShape {
        /// The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.  This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.
        public let maxResults: Int?
        /// If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListStateMachinesOutput: AWSDecodableShape {
        /// If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
        public let nextToken: String?
        public let stateMachines: [StateMachineListItem]

        public init(nextToken: String? = nil, stateMachines: [StateMachineListItem]) {
            self.nextToken = nextToken
            self.stateMachines = stateMachines
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case stateMachines
        }
    }

    public struct ListTagsForResourceInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) for the Step Functions state machine or activity.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
        }
    }

    public struct ListTagsForResourceOutput: AWSDecodableShape {
        /// An array of tags associated with the resource.
        public let tags: [Tag]?

        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct LogDestination: AWSEncodableShape & AWSDecodableShape {
        /// An object describing a CloudWatch log group. For more information, see AWS::Logs::LogGroup in the CloudFormation User Guide.
        public let cloudWatchLogsLogGroup: CloudWatchLogsLogGroup?

        public init(cloudWatchLogsLogGroup: CloudWatchLogsLogGroup? = nil) {
            self.cloudWatchLogsLogGroup = cloudWatchLogsLogGroup
        }

        public func validate(name: String) throws {
            try self.cloudWatchLogsLogGroup?.validate(name: "\(name).cloudWatchLogsLogGroup")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogsLogGroup
        }
    }

    public struct LoggingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// An array of objects that describes where your execution history events will be logged. Limited to size 1. Required, if your log level is not set to OFF.
        public let destinations: [LogDestination]?
        /// Determines whether execution data is included in your log. When set to false, data is excluded.
        public let includeExecutionData: Bool?
        /// Defines which category of execution history events are logged.
        public let level: LogLevel?

        public init(destinations: [LogDestination]? = nil, includeExecutionData: Bool? = nil, level: LogLevel? = nil) {
            self.destinations = destinations
            self.includeExecutionData = includeExecutionData
            self.level = level
        }

        public func validate(name: String) throws {
            try self.destinations?.forEach {
                try $0.validate(name: "\(name).destinations[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case destinations
            case includeExecutionData
            case level
        }
    }

    public struct MapIterationEventDetails: AWSDecodableShape {
        /// The index of the array belonging to the Map state iteration.
        public let index: Int?
        /// The name of the iteration’s parent Map state.
        public let name: String?

        public init(index: Int? = nil, name: String? = nil) {
            self.index = index
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case index
            case name
        }
    }

    public struct MapRunExecutionCounts: AWSDecodableShape {
        /// The total number of child workflow executions that were started by a Map Run and were running, but were either stopped by the user or by Step Functions because the Map Run failed.
        public let aborted: Int64
        /// The total number of child workflow executions that were started by a Map Run, but have failed.
        public let failed: Int64
        /// The total number of child workflow executions that were started by a Map Run, but haven't started executing yet.
        public let pending: Int64
        /// Returns the count of child workflow executions whose results were written by ResultWriter. For more information, see ResultWriter in the Step Functions Developer Guide.
        public let resultsWritten: Int64
        /// The total number of child workflow executions that were started by a Map Run and are currently in-progress.
        public let running: Int64
        /// The total number of child workflow executions that were started by a Map Run and have completed successfully.
        public let succeeded: Int64
        /// The total number of child workflow executions that were started by a Map Run and have timed out.
        public let timedOut: Int64
        /// The total number of child workflow executions that were started by a Map Run.
        public let total: Int64

        public init(aborted: Int64, failed: Int64, pending: Int64, resultsWritten: Int64, running: Int64, succeeded: Int64, timedOut: Int64, total: Int64) {
            self.aborted = aborted
            self.failed = failed
            self.pending = pending
            self.resultsWritten = resultsWritten
            self.running = running
            self.succeeded = succeeded
            self.timedOut = timedOut
            self.total = total
        }

        private enum CodingKeys: String, CodingKey {
            case aborted
            case failed
            case pending
            case resultsWritten
            case running
            case succeeded
            case timedOut
            case total
        }
    }

    public struct MapRunFailedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the Map Run failure.
        public let error: String?

        public init(cause: String? = nil, error: String? = nil) {
            self.cause = cause
            self.error = error
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
        }
    }

    public struct MapRunItemCounts: AWSDecodableShape {
        /// The total number of items processed in child workflow executions that were either stopped by the user or by Step Functions, because the Map Run failed.
        public let aborted: Int64
        /// The total number of items processed in child workflow executions that have failed.
        public let failed: Int64
        /// The total number of items to process in child workflow executions that haven't started running yet.
        public let pending: Int64
        /// Returns the count of items whose results were written by ResultWriter. For more information, see ResultWriter in the Step Functions Developer Guide.
        public let resultsWritten: Int64
        /// The total number of items being processed in child workflow executions that are currently in-progress.
        public let running: Int64
        /// The total number of items processed in child workflow executions that have completed successfully.
        public let succeeded: Int64
        /// The total number of items processed in child workflow executions that have timed out.
        public let timedOut: Int64
        /// The total number of items processed in all the child workflow executions started by a Map Run.
        public let total: Int64

        public init(aborted: Int64, failed: Int64, pending: Int64, resultsWritten: Int64, running: Int64, succeeded: Int64, timedOut: Int64, total: Int64) {
            self.aborted = aborted
            self.failed = failed
            self.pending = pending
            self.resultsWritten = resultsWritten
            self.running = running
            self.succeeded = succeeded
            self.timedOut = timedOut
            self.total = total
        }

        private enum CodingKeys: String, CodingKey {
            case aborted
            case failed
            case pending
            case resultsWritten
            case running
            case succeeded
            case timedOut
            case total
        }
    }

    public struct MapRunListItem: AWSDecodableShape {
        /// The executionArn of the execution from which the Map Run was started.
        public let executionArn: String
        /// The Amazon Resource Name (ARN) of the Map Run.
        public let mapRunArn: String
        /// The date on which the Map Run started.
        public let startDate: Date
        /// The Amazon Resource Name (ARN) of the executed state machine.
        public let stateMachineArn: String
        /// The date on which the Map Run stopped.
        public let stopDate: Date?

        public init(executionArn: String, mapRunArn: String, startDate: Date, stateMachineArn: String, stopDate: Date? = nil) {
            self.executionArn = executionArn
            self.mapRunArn = mapRunArn
            self.startDate = startDate
            self.stateMachineArn = stateMachineArn
            self.stopDate = stopDate
        }

        private enum CodingKeys: String, CodingKey {
            case executionArn
            case mapRunArn
            case startDate
            case stateMachineArn
            case stopDate
        }
    }

    public struct MapRunStartedEventDetails: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of a Map Run that was started.
        public let mapRunArn: String?

        public init(mapRunArn: String? = nil) {
            self.mapRunArn = mapRunArn
        }

        private enum CodingKeys: String, CodingKey {
            case mapRunArn
        }
    }

    public struct MapStateStartedEventDetails: AWSDecodableShape {
        /// The size of the array for Map state iterations.
        public let length: Int?

        public init(length: Int? = nil) {
            self.length = length
        }

        private enum CodingKeys: String, CodingKey {
            case length
        }
    }

    public struct SendTaskFailureInput: AWSEncodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?
        /// The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the context object when a workflow enters a task state. See GetActivityTaskOutput$taskToken.
        public let taskToken: String

        public init(cause: String? = nil, error: String? = nil, taskToken: String) {
            self.cause = cause
            self.error = error
            self.taskToken = taskToken
        }

        public func validate(name: String) throws {
            try self.validate(self.cause, name: "cause", parent: name, max: 32768)
            try self.validate(self.error, name: "error", parent: name, max: 256)
            try self.validate(self.taskToken, name: "taskToken", parent: name, max: 1024)
            try self.validate(self.taskToken, name: "taskToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
            case taskToken
        }
    }

    public struct SendTaskFailureOutput: AWSDecodableShape {
        public init() {}
    }

    public struct SendTaskHeartbeatInput: AWSEncodableShape {
        /// The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the context object when a workflow enters a task state. See GetActivityTaskOutput$taskToken.
        public let taskToken: String

        public init(taskToken: String) {
            self.taskToken = taskToken
        }

        public func validate(name: String) throws {
            try self.validate(self.taskToken, name: "taskToken", parent: name, max: 1024)
            try self.validate(self.taskToken, name: "taskToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case taskToken
        }
    }

    public struct SendTaskHeartbeatOutput: AWSDecodableShape {
        public init() {}
    }

    public struct SendTaskSuccessInput: AWSEncodableShape {
        /// The JSON output of the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let output: String
        /// The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the context object when a workflow enters a task state. See GetActivityTaskOutput$taskToken.
        public let taskToken: String

        public init(output: String, taskToken: String) {
            self.output = output
            self.taskToken = taskToken
        }

        public func validate(name: String) throws {
            try self.validate(self.output, name: "output", parent: name, max: 262_144)
            try self.validate(self.taskToken, name: "taskToken", parent: name, max: 1024)
            try self.validate(self.taskToken, name: "taskToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case output
            case taskToken
        }
    }

    public struct SendTaskSuccessOutput: AWSDecodableShape {
        public init() {}
    }

    public struct StartExecutionInput: AWSEncodableShape {
        /// The string that contains the JSON input data for the execution, for example:  "input": "{\"first_name\" : \"test\"}"   If you don't include any JSON input data, you still must include the two braces, for example: "input": "{}"   Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let input: String?
        /// The name of the execution. This name must be unique for your Amazon Web Services account, region, and state machine for 90 days. For more information, see  Limits Related to State Machine Executions in the Step Functions Developer Guide.  A name must not contain:   white space   brackets  { } [ ]    wildcard characters ? *    special characters " # % \ ^ | ~ ` $ & , ; : /    control characters (U+0000-001F, U+007F-009F)   To enable logging with CloudWatch Logs, the name should only contain  0-9, A-Z, a-z, - and _.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the state machine to execute.
        public let stateMachineArn: String
        /// Passes the X-Ray trace header. The trace header can also be passed in the request payload.
        public let traceHeader: String?

        public init(input: String? = nil, name: String? = nil, stateMachineArn: String, traceHeader: String? = nil) {
            self.input = input
            self.name = name
            self.stateMachineArn = stateMachineArn
            self.traceHeader = traceHeader
        }

        public func validate(name: String) throws {
            try self.validate(self.input, name: "input", parent: name, max: 262_144)
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, max: 256)
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, min: 1)
            try self.validate(self.traceHeader, name: "traceHeader", parent: name, max: 256)
            try self.validate(self.traceHeader, name: "traceHeader", parent: name, pattern: "^\\p{ASCII}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case input
            case name
            case stateMachineArn
            case traceHeader
        }
    }

    public struct StartExecutionOutput: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that identifies the execution.
        public let executionArn: String
        /// The date the execution is started.
        public let startDate: Date

        public init(executionArn: String, startDate: Date) {
            self.executionArn = executionArn
            self.startDate = startDate
        }

        private enum CodingKeys: String, CodingKey {
            case executionArn
            case startDate
        }
    }

    public struct StartSyncExecutionInput: AWSEncodableShape {
        /// The string that contains the JSON input data for the execution, for example:  "input": "{\"first_name\" : \"test\"}"   If you don't include any JSON input data, you still must include the two braces, for example: "input": "{}"   Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let input: String?
        /// The name of the execution.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the state machine to execute.
        public let stateMachineArn: String
        /// Passes the X-Ray trace header. The trace header can also be passed in the request payload.
        public let traceHeader: String?

        public init(input: String? = nil, name: String? = nil, stateMachineArn: String, traceHeader: String? = nil) {
            self.input = input
            self.name = name
            self.stateMachineArn = stateMachineArn
            self.traceHeader = traceHeader
        }

        public func validate(name: String) throws {
            try self.validate(self.input, name: "input", parent: name, max: 262_144)
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, max: 256)
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, min: 1)
            try self.validate(self.traceHeader, name: "traceHeader", parent: name, max: 256)
            try self.validate(self.traceHeader, name: "traceHeader", parent: name, pattern: "^\\p{ASCII}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case input
            case name
            case stateMachineArn
            case traceHeader
        }
    }

    public struct StartSyncExecutionOutput: AWSDecodableShape {
        /// An object that describes workflow billing details, including billed duration and memory use.
        public let billingDetails: BillingDetails?
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?
        /// The Amazon Resource Name (ARN) that identifies the execution.
        public let executionArn: String
        /// The string that contains the JSON input data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let input: String?
        public let inputDetails: CloudWatchEventsExecutionDataDetails?
        /// The name of the execution.
        public let name: String?
        /// The JSON output data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.  This field is set only if the execution succeeds. If the execution fails, this field is null.
        public let output: String?
        public let outputDetails: CloudWatchEventsExecutionDataDetails?
        /// The date the execution is started.
        public let startDate: Date
        /// The Amazon Resource Name (ARN) that identifies the state machine.
        public let stateMachineArn: String?
        /// The current status of the execution.
        public let status: SyncExecutionStatus
        /// If the execution has already ended, the date the execution stopped.
        public let stopDate: Date
        /// The X-Ray trace header that was passed to the execution.
        public let traceHeader: String?

        public init(billingDetails: BillingDetails? = nil, cause: String? = nil, error: String? = nil, executionArn: String, input: String? = nil, inputDetails: CloudWatchEventsExecutionDataDetails? = nil, name: String? = nil, output: String? = nil, outputDetails: CloudWatchEventsExecutionDataDetails? = nil, startDate: Date, stateMachineArn: String? = nil, status: SyncExecutionStatus, stopDate: Date, traceHeader: String? = nil) {
            self.billingDetails = billingDetails
            self.cause = cause
            self.error = error
            self.executionArn = executionArn
            self.input = input
            self.inputDetails = inputDetails
            self.name = name
            self.output = output
            self.outputDetails = outputDetails
            self.startDate = startDate
            self.stateMachineArn = stateMachineArn
            self.status = status
            self.stopDate = stopDate
            self.traceHeader = traceHeader
        }

        private enum CodingKeys: String, CodingKey {
            case billingDetails
            case cause
            case error
            case executionArn
            case input
            case inputDetails
            case name
            case output
            case outputDetails
            case startDate
            case stateMachineArn
            case status
            case stopDate
            case traceHeader
        }
    }

    public struct StateEnteredEventDetails: AWSDecodableShape {
        /// The string that contains the JSON input data for the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let input: String?
        /// Contains details about the input for an execution history event.
        public let inputDetails: HistoryEventExecutionDataDetails?
        /// The name of the state.
        public let name: String

        public init(input: String? = nil, inputDetails: HistoryEventExecutionDataDetails? = nil, name: String) {
            self.input = input
            self.inputDetails = inputDetails
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case input
            case inputDetails
            case name
        }
    }

    public struct StateExitedEventDetails: AWSDecodableShape {
        /// The name of the state. A name must not contain:   white space   brackets  { } [ ]    wildcard characters ? *    special characters " # % \ ^ | ~ ` $ & , ; : /    control characters (U+0000-001F, U+007F-009F)   To enable logging with CloudWatch Logs, the name should only contain  0-9, A-Z, a-z, - and _.
        public let name: String
        /// The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let output: String?
        /// Contains details about the output of an execution history event.
        public let outputDetails: HistoryEventExecutionDataDetails?

        public init(name: String, output: String? = nil, outputDetails: HistoryEventExecutionDataDetails? = nil) {
            self.name = name
            self.output = output
            self.outputDetails = outputDetails
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case output
            case outputDetails
        }
    }

    public struct StateMachineListItem: AWSDecodableShape {
        /// The date the state machine is created.
        public let creationDate: Date
        /// The name of the state machine.  A name must not contain:   white space   brackets  { } [ ]    wildcard characters ? *    special characters " # % \ ^ | ~ ` $ & , ; : /    control characters (U+0000-001F, U+007F-009F)   To enable logging with CloudWatch Logs, the name should only contain  0-9, A-Z, a-z, - and _.
        public let name: String
        /// The Amazon Resource Name (ARN) that identifies the state machine.
        public let stateMachineArn: String
        public let type: StateMachineType

        public init(creationDate: Date, name: String, stateMachineArn: String, type: StateMachineType) {
            self.creationDate = creationDate
            self.name = name
            self.stateMachineArn = stateMachineArn
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case name
            case stateMachineArn
            case type
        }
    }

    public struct StopExecutionInput: AWSEncodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?
        /// The Amazon Resource Name (ARN) of the execution to stop.
        public let executionArn: String

        public init(cause: String? = nil, error: String? = nil, executionArn: String) {
            self.cause = cause
            self.error = error
            self.executionArn = executionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.cause, name: "cause", parent: name, max: 32768)
            try self.validate(self.error, name: "error", parent: name, max: 256)
            try self.validate(self.executionArn, name: "executionArn", parent: name, max: 256)
            try self.validate(self.executionArn, name: "executionArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
            case executionArn
        }
    }

    public struct StopExecutionOutput: AWSDecodableShape {
        /// The date the execution is stopped.
        public let stopDate: Date

        public init(stopDate: Date) {
            self.stopDate = stopDate
        }

        private enum CodingKeys: String, CodingKey {
            case stopDate
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key of a tag.
        public let key: String?
        /// The value of a tag.
        public let value: String?

        public init(key: String? = nil, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key
            case value
        }
    }

    public struct TagResourceInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) for the Step Functions state machine or activity.
        public let resourceArn: String
        /// The list of tags to add to a resource.  Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @.
        public let tags: [Tag]

        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case tags
        }
    }

    public struct TagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct TaskCredentials: AWSDecodableShape {
        /// The ARN of an IAM role that Step Functions assumes for the task. The role can allow cross-account access to resources.
        public let roleArn: String?

        public init(roleArn: String? = nil) {
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn
        }
    }

    public struct TaskFailedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?
        /// The action of the resource called by a task state.
        public let resource: String
        /// The service name of the resource in a task state.
        public let resourceType: String

        public init(cause: String? = nil, error: String? = nil, resource: String, resourceType: String) {
            self.cause = cause
            self.error = error
            self.resource = resource
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
            case resource
            case resourceType
        }
    }

    public struct TaskScheduledEventDetails: AWSDecodableShape {
        /// The maximum allowed duration between two heartbeats for the task.
        public let heartbeatInSeconds: Int64?
        /// The JSON data passed to the resource referenced in a task state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let parameters: String
        /// The region of the scheduled task
        public let region: String
        /// The action of the resource called by a task state.
        public let resource: String
        /// The service name of the resource in a task state.
        public let resourceType: String
        /// The credentials that Step Functions uses for the task.
        public let taskCredentials: TaskCredentials?
        /// The maximum allowed duration of the task.
        public let timeoutInSeconds: Int64?

        public init(heartbeatInSeconds: Int64? = nil, parameters: String, region: String, resource: String, resourceType: String, taskCredentials: TaskCredentials? = nil, timeoutInSeconds: Int64? = nil) {
            self.heartbeatInSeconds = heartbeatInSeconds
            self.parameters = parameters
            self.region = region
            self.resource = resource
            self.resourceType = resourceType
            self.taskCredentials = taskCredentials
            self.timeoutInSeconds = timeoutInSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case heartbeatInSeconds
            case parameters
            case region
            case resource
            case resourceType
            case taskCredentials
            case timeoutInSeconds
        }
    }

    public struct TaskStartFailedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?
        /// The action of the resource called by a task state.
        public let resource: String
        /// The service name of the resource in a task state.
        public let resourceType: String

        public init(cause: String? = nil, error: String? = nil, resource: String, resourceType: String) {
            self.cause = cause
            self.error = error
            self.resource = resource
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
            case resource
            case resourceType
        }
    }

    public struct TaskStartedEventDetails: AWSDecodableShape {
        /// The action of the resource called by a task state.
        public let resource: String
        /// The service name of the resource in a task state.
        public let resourceType: String

        public init(resource: String, resourceType: String) {
            self.resource = resource
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case resource
            case resourceType
        }
    }

    public struct TaskSubmitFailedEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?
        /// The action of the resource called by a task state.
        public let resource: String
        /// The service name of the resource in a task state.
        public let resourceType: String

        public init(cause: String? = nil, error: String? = nil, resource: String, resourceType: String) {
            self.cause = cause
            self.error = error
            self.resource = resource
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
            case resource
            case resourceType
        }
    }

    public struct TaskSubmittedEventDetails: AWSDecodableShape {
        /// The response from a resource when a task has started. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let output: String?
        /// Contains details about the output of an execution history event.
        public let outputDetails: HistoryEventExecutionDataDetails?
        /// The action of the resource called by a task state.
        public let resource: String
        /// The service name of the resource in a task state.
        public let resourceType: String

        public init(output: String? = nil, outputDetails: HistoryEventExecutionDataDetails? = nil, resource: String, resourceType: String) {
            self.output = output
            self.outputDetails = outputDetails
            self.resource = resource
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case output
            case outputDetails
            case resource
            case resourceType
        }
    }

    public struct TaskSucceededEventDetails: AWSDecodableShape {
        /// The full JSON response from a resource when a task has succeeded. This response becomes the output of the related task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
        public let output: String?
        /// Contains details about the output of an execution history event.
        public let outputDetails: HistoryEventExecutionDataDetails?
        /// The action of the resource called by a task state.
        public let resource: String
        /// The service name of the resource in a task state.
        public let resourceType: String

        public init(output: String? = nil, outputDetails: HistoryEventExecutionDataDetails? = nil, resource: String, resourceType: String) {
            self.output = output
            self.outputDetails = outputDetails
            self.resource = resource
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case output
            case outputDetails
            case resource
            case resourceType
        }
    }

    public struct TaskTimedOutEventDetails: AWSDecodableShape {
        /// A more detailed explanation of the cause of the failure.
        public let cause: String?
        /// The error code of the failure.
        public let error: String?
        /// The action of the resource called by a task state.
        public let resource: String
        /// The service name of the resource in a task state.
        public let resourceType: String

        public init(cause: String? = nil, error: String? = nil, resource: String, resourceType: String) {
            self.cause = cause
            self.error = error
            self.resource = resource
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case cause
            case error
            case resource
            case resourceType
        }
    }

    public struct TracingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// When set to true, X-Ray tracing is enabled.
        public let enabled: Bool?

        public init(enabled: Bool? = nil) {
            self.enabled = enabled
        }

        private enum CodingKeys: String, CodingKey {
            case enabled
        }
    }

    public struct UntagResourceInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) for the Step Functions state machine or activity.
        public let resourceArn: String
        /// The list of tags to remove from the resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case tagKeys
        }
    }

    public struct UntagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateMapRunInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of a Map Run.
        public let mapRunArn: String
        /// The maximum number of child workflow executions that can be specified to run in parallel for the Map Run at the same time.
        public let maxConcurrency: Int?
        /// The maximum number of failed items before the Map Run fails.
        public let toleratedFailureCount: Int64?
        /// The maximum percentage of failed items before the Map Run fails.
        public let toleratedFailurePercentage: Float?

        public init(mapRunArn: String, maxConcurrency: Int? = nil, toleratedFailureCount: Int64? = nil, toleratedFailurePercentage: Float? = nil) {
            self.mapRunArn = mapRunArn
            self.maxConcurrency = maxConcurrency
            self.toleratedFailureCount = toleratedFailureCount
            self.toleratedFailurePercentage = toleratedFailurePercentage
        }

        public func validate(name: String) throws {
            try self.validate(self.mapRunArn, name: "mapRunArn", parent: name, max: 2000)
            try self.validate(self.mapRunArn, name: "mapRunArn", parent: name, min: 1)
            try self.validate(self.maxConcurrency, name: "maxConcurrency", parent: name, min: 0)
            try self.validate(self.toleratedFailureCount, name: "toleratedFailureCount", parent: name, min: 0)
            try self.validate(self.toleratedFailurePercentage, name: "toleratedFailurePercentage", parent: name, max: 100.0)
            try self.validate(self.toleratedFailurePercentage, name: "toleratedFailurePercentage", parent: name, min: 0.0)
        }

        private enum CodingKeys: String, CodingKey {
            case mapRunArn
            case maxConcurrency
            case toleratedFailureCount
            case toleratedFailurePercentage
        }
    }

    public struct UpdateMapRunOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateStateMachineInput: AWSEncodableShape {
        /// The Amazon States Language definition of the state machine. See Amazon States Language.
        public let definition: String?
        /// The LoggingConfiguration data type is used to set CloudWatch Logs options.
        public let loggingConfiguration: LoggingConfiguration?
        /// The Amazon Resource Name (ARN) of the IAM role of the state machine.
        public let roleArn: String?
        /// The Amazon Resource Name (ARN) of the state machine.
        public let stateMachineArn: String
        /// Selects whether X-Ray tracing is enabled.
        public let tracingConfiguration: TracingConfiguration?

        public init(definition: String? = nil, loggingConfiguration: LoggingConfiguration? = nil, roleArn: String? = nil, stateMachineArn: String, tracingConfiguration: TracingConfiguration? = nil) {
            self.definition = definition
            self.loggingConfiguration = loggingConfiguration
            self.roleArn = roleArn
            self.stateMachineArn = stateMachineArn
            self.tracingConfiguration = tracingConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.definition, name: "definition", parent: name, max: 1_048_576)
            try self.validate(self.definition, name: "definition", parent: name, min: 1)
            try self.loggingConfiguration?.validate(name: "\(name).loggingConfiguration")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 256)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 1)
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, max: 256)
            try self.validate(self.stateMachineArn, name: "stateMachineArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case definition
            case loggingConfiguration
            case roleArn
            case stateMachineArn
            case tracingConfiguration
        }
    }

    public struct UpdateStateMachineOutput: AWSDecodableShape {
        /// The date and time the state machine was updated.
        public let updateDate: Date

        public init(updateDate: Date) {
            self.updateDate = updateDate
        }

        private enum CodingKeys: String, CodingKey {
            case updateDate
        }
    }
}

// MARK: - Errors

/// Error enum for SFN
public struct SFNErrorType: AWSErrorType {
    enum Code: String {
        case activityDoesNotExist = "ActivityDoesNotExist"
        case activityLimitExceeded = "ActivityLimitExceeded"
        case activityWorkerLimitExceeded = "ActivityWorkerLimitExceeded"
        case executionAlreadyExists = "ExecutionAlreadyExists"
        case executionDoesNotExist = "ExecutionDoesNotExist"
        case executionLimitExceeded = "ExecutionLimitExceeded"
        case invalidArn = "InvalidArn"
        case invalidDefinition = "InvalidDefinition"
        case invalidExecutionInput = "InvalidExecutionInput"
        case invalidLoggingConfiguration = "InvalidLoggingConfiguration"
        case invalidName = "InvalidName"
        case invalidOutput = "InvalidOutput"
        case invalidToken = "InvalidToken"
        case invalidTracingConfiguration = "InvalidTracingConfiguration"
        case missingRequiredParameter = "MissingRequiredParameter"
        case resourceNotFound = "ResourceNotFound"
        case stateMachineAlreadyExists = "StateMachineAlreadyExists"
        case stateMachineDeleting = "StateMachineDeleting"
        case stateMachineDoesNotExist = "StateMachineDoesNotExist"
        case stateMachineLimitExceeded = "StateMachineLimitExceeded"
        case stateMachineTypeNotSupported = "StateMachineTypeNotSupported"
        case taskDoesNotExist = "TaskDoesNotExist"
        case taskTimedOut = "TaskTimedOut"
        case tooManyTags = "TooManyTags"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize SFN
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The specified activity does not exist.
    public static var activityDoesNotExist: Self { .init(.activityDoesNotExist) }
    /// The maximum number of activities has been reached. Existing activities must be deleted before a new activity can be created.
    public static var activityLimitExceeded: Self { .init(.activityLimitExceeded) }
    /// The maximum number of workers concurrently polling for activity tasks has been reached.
    public static var activityWorkerLimitExceeded: Self { .init(.activityWorkerLimitExceeded) }
    /// The execution has the same name as another execution (but a different input).  Executions with the same name and input are considered idempotent.
    public static var executionAlreadyExists: Self { .init(.executionAlreadyExists) }
    /// The specified execution does not exist.
    public static var executionDoesNotExist: Self { .init(.executionDoesNotExist) }
    /// The maximum number of running executions has been reached. Running executions must end or be stopped before a new execution can be started.
    public static var executionLimitExceeded: Self { .init(.executionLimitExceeded) }
    /// The provided Amazon Resource Name (ARN) is not valid.
    public static var invalidArn: Self { .init(.invalidArn) }
    /// The provided Amazon States Language definition is not valid.
    public static var invalidDefinition: Self { .init(.invalidDefinition) }
    /// The provided JSON input data is not valid.
    public static var invalidExecutionInput: Self { .init(.invalidExecutionInput) }
    public static var invalidLoggingConfiguration: Self { .init(.invalidLoggingConfiguration) }
    /// The provided name is not valid.
    public static var invalidName: Self { .init(.invalidName) }
    /// The provided JSON output data is not valid.
    public static var invalidOutput: Self { .init(.invalidOutput) }
    /// The provided token is not valid.
    public static var invalidToken: Self { .init(.invalidToken) }
    /// Your tracingConfiguration key does not match, or enabled has not been set to true or false.
    public static var invalidTracingConfiguration: Self { .init(.invalidTracingConfiguration) }
    /// Request is missing a required parameter. This error occurs if both definition and roleArn are not specified.
    public static var missingRequiredParameter: Self { .init(.missingRequiredParameter) }
    /// Could not find the referenced resource. Only state machine and activity ARNs are supported.
    public static var resourceNotFound: Self { .init(.resourceNotFound) }
    /// A state machine with the same name but a different definition or role ARN already exists.
    public static var stateMachineAlreadyExists: Self { .init(.stateMachineAlreadyExists) }
    /// The specified state machine is being deleted.
    public static var stateMachineDeleting: Self { .init(.stateMachineDeleting) }
    /// The specified state machine does not exist.
    public static var stateMachineDoesNotExist: Self { .init(.stateMachineDoesNotExist) }
    /// The maximum number of state machines has been reached. Existing state machines must be deleted before a new state machine can be created.
    public static var stateMachineLimitExceeded: Self { .init(.stateMachineLimitExceeded) }
    public static var stateMachineTypeNotSupported: Self { .init(.stateMachineTypeNotSupported) }
    public static var taskDoesNotExist: Self { .init(.taskDoesNotExist) }
    public static var taskTimedOut: Self { .init(.taskTimedOut) }
    /// You&#39;ve exceeded the number of tags allowed for a resource. See the  Limits Topic in the Step Functions Developer Guide.
    public static var tooManyTags: Self { .init(.tooManyTags) }
    /// The input does not satisfy the constraints specified by an Amazon Web Services service.
    public static var validationException: Self { .init(.validationException) }
}

extension SFNErrorType: Equatable {
    public static func == (lhs: SFNErrorType, rhs: SFNErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension SFNErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
